﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace HomeCloudStorageSystem.Models
{
    /// <summary>
    /// 文件上传记录模型
    /// </summary>
    [Table("FileUploagLog")]
    public class FileUploagLog
    {
        /// <summary>
        /// 文件 ID
        /// </summary>
        [Key]
        public int Id { get; set; }
        /// <summary>
        /// 文件上传人员
        /// </summary>
        [Required(ErrorMessage = "文件上传人员不能为空")]
        public int UploadPersonnel { get; set; }
        /// <summary>
        /// 上传时间
        /// </summary>
        [Required(ErrorMessage = "上传时间不能为空")]
        public string OperationTime { get; set; }
        /// <summary>
        /// 上传描述
        /// </summary>
        [Required(ErrorMessage = "上传描述不能为空")]
        public string? Describe { get; set; }
        /// <summary>
        /// 文件上传状态
        /// </summary>
        [Required(ErrorMessage = "文件上传状态不能为空")]
        public string State { get; set; }
        /// <summary>
        /// 上传人 ID
        /// </summary>
        [Required(ErrorMessage = "文件上传人不能为空")]
        public int Uploader { get; set; }
    }
}
